﻿using System;
using System.Collections.Generic;
using System.Linq;
using SqlSugar;
namespace Zhao.Models.Entity
{
    /// <summary>
    /// 商家账单明细表
    ///</summary>
    [SugarTable("Bill")]
    public class Bill
    {


        /// <summary>
        /// 备  注:账单唯一ID
        /// 默认值:
        ///</summary>
        [SugarColumn(ColumnName = "id", IsPrimaryKey = true, IsIdentity = true)]
        public int Id { get; set; }

        /// <summary>
        /// 备  注:关联用户ID（用户相关交易时非空）
        /// 默认值:
        ///</summary>
        [SugarColumn(ColumnName = "UseId")]
        public int? UseId { get; set; }

        /// <summary>
        /// 备  注:关联球馆ID（如费用归属具体场地）
        /// 默认值:
        ///</summary>
        [SugarColumn(ColumnName = "VenuesId")]
        public Guid? VenuesId { get; set; }

        /// <summary>
        /// 备  注:（如活动报名费场景）
        /// 默认值:
        ///</summary>
        [SugarColumn(ColumnName = "ActivityId")]
        public int? ActivityId { get; set; }

        /// <summary>
        /// 备  注:交易金额（正数：收入，负数：支出）
        /// 默认值:
        ///</summary>
        [SugarColumn(ColumnName = "Amount")]
        public decimal Amount { get; set; }

        /// <summary>
        /// 备  注:交易类型 (1:活动收入 3预定场地收入 5 提现 7手续费 9退款)
        /// 默认值:
        ///</summary>
        [SugarColumn(ColumnName = "Type")]
        public byte Type { get; set; }

        /// <summary>
        /// 备  注:状态（1:成功 3:失败 5:处理中）
        /// 默认值:
        ///</summary>
        [SugarColumn(ColumnName = "Status")]
        public byte Status { get; set; }

        /// <summary>
        /// 备  注:联业务单号（如订单号、充值流水号）
        /// 默认值:
        ///</summary>
        [SugarColumn(ColumnName = "RelatedOrderNo")]
        public string? RelatedOrderNo { get; set; }

        /// <summary>
        /// 备  注:第三方支付流水号（如微信支付号）
        /// 默认值:
        ///</summary>
        [SugarColumn(ColumnName = "TransactionNo")]
        public string? TransactionNo { get; set; }

        /// <summary>
        /// 备  注:备注（如“提现至中国银行尾号1234”）
        /// 默认值:
        ///</summary>
        [SugarColumn(ColumnName = "Remark")]
        public string? Remark { get; set; }

        /// <summary>
        /// 备  注:创建时间
        /// 默认值:
        ///</summary>
        [SugarColumn(ColumnName = "CreatedAt")]
        public DateTime? CreatedAt { get; set; }

        /// <summary>
        /// 备  注:更新时间
        /// 默认值:
        ///</summary>
        [SugarColumn(ColumnName = "UpdatedAt")]
        public DateTime? UpdatedAt { get; set; }

        /// <summary>
        /// 备  注:关联预约订单ID
        /// 默认值:
        ///</summary>
        [SugarColumn(ColumnName = "AppointmentsId")]
        public int? AppointmentsId { get; set; }


    }

}